Optimal. Leaf size=123 \[ \frac {2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac {(2 c d-b e+2 a f) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {1677, 1674, 12,
632, 212} \begin {gather*} \frac {-\left (x^2 \left (-2 a c f+b^2 f-b c e+2 c^2 d\right )\right )-b (a f+c d)+2 a c e}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac {\tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right ) (2 a f-b e+2 c d)}{\left (b^2-4 a c\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 212
Rule 632
Rule 1674
Rule 1677
Rubi steps
\begin {align*} \int \frac {x \left (d+e x^2+f x^4\right )}{\left (a+b x^2+c x^4\right )^2} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {d+e x+f x^2}{\left (a+b x+c x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac {2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac {\text {Subst}\left (\int \frac {2 c d-b e+2 a f}{a+b x+c x^2} \, dx,x,x^2\right )}{2 \left (b^2-4 a c\right )}\\ &=\frac {2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac {(2 c d-b e+2 a f) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^2\right )}{2 \left (b^2-4 a c\right )}\\ &=\frac {2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac {(2 c d-b e+2 a f) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{b^2-4 a c}\\ &=\frac {2 a c e-b (c d+a f)-\left (2 c^2 d-b c e+b^2 f-2 a c f\right ) x^2}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac {(2 c d-b e+2 a f) \tanh ^{-1}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 130, normalized size = 1.06 \begin {gather*} \frac {a b f+2 c^2 d x^2+b^2 f x^2+b c \left (d-e x^2\right )-2 a c \left (e+f x^2\right )}{2 c \left (-b^2+4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac {(-2 c d+b e-2 a f) \tan ^{-1}\left (\frac {b+2 c x^2}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 139, normalized size = 1.13
method | result | size |
default | \(\frac {-\frac {\left (2 a c f -b^{2} f +b c e -2 c^{2} d \right ) x^{2}}{c \left (4 a c -b^{2}\right )}+\frac {a b f -2 a c e +b c d}{c \left (4 a c -b^{2}\right )}}{2 c \,x^{4}+2 b \,x^{2}+2 a}+\frac {\left (2 f a -e b +2 c d \right ) \arctan \left (\frac {2 c \,x^{2}+b}{\sqrt {4 a c -b^{2}}}\right )}{\left (4 a c -b^{2}\right )^{\frac {3}{2}}}\) | \(139\) |
risch | \(\frac {-\frac {\left (2 a c f -b^{2} f +b c e -2 c^{2} d \right ) x^{2}}{2 c \left (4 a c -b^{2}\right )}+\frac {a b f -2 a c e +b c d}{2 c \left (4 a c -b^{2}\right )}}{c \,x^{4}+b \,x^{2}+a}+\frac {\ln \left (\left (\left (-4 a c +b^{2}\right )^{\frac {3}{2}}+4 a b c -b^{3}\right ) x^{2}+8 a^{2} c -2 a \,b^{2}\right ) f a}{\left (-4 a c +b^{2}\right )^{\frac {3}{2}}}-\frac {\ln \left (\left (\left (-4 a c +b^{2}\right )^{\frac {3}{2}}+4 a b c -b^{3}\right ) x^{2}+8 a^{2} c -2 a \,b^{2}\right ) e b}{2 \left (-4 a c +b^{2}\right )^{\frac {3}{2}}}+\frac {\ln \left (\left (\left (-4 a c +b^{2}\right )^{\frac {3}{2}}+4 a b c -b^{3}\right ) x^{2}+8 a^{2} c -2 a \,b^{2}\right ) c d}{\left (-4 a c +b^{2}\right )^{\frac {3}{2}}}-\frac {\ln \left (\left (\left (-4 a c +b^{2}\right )^{\frac {3}{2}}-4 a b c +b^{3}\right ) x^{2}-8 a^{2} c +2 a \,b^{2}\right ) f a}{\left (-4 a c +b^{2}\right )^{\frac {3}{2}}}+\frac {\ln \left (\left (\left (-4 a c +b^{2}\right )^{\frac {3}{2}}-4 a b c +b^{3}\right ) x^{2}-8 a^{2} c +2 a \,b^{2}\right ) e b}{2 \left (-4 a c +b^{2}\right )^{\frac {3}{2}}}-\frac {\ln \left (\left (\left (-4 a c +b^{2}\right )^{\frac {3}{2}}-4 a b c +b^{3}\right ) x^{2}-8 a^{2} c +2 a \,b^{2}\right ) c d}{\left (-4 a c +b^{2}\right )^{\frac {3}{2}}}\) | \(401\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 313 vs.
\(2 (117) = 234\).
time = 0.39, size = 650, normalized size = 5.28 \begin {gather*} \left [-\frac {{\left (2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d - {\left (b^{3} c - 4 \, a b c^{2}\right )} e + {\left (b^{4} - 6 \, a b^{2} c + 8 \, a^{2} c^{2}\right )} f\right )} x^{2} + {\left ({\left (2 \, c^{3} d - b c^{2} e + 2 \, a c^{2} f\right )} x^{4} + 2 \, a c^{2} d - a b c e + 2 \, a^{2} c f + {\left (2 \, b c^{2} d - b^{2} c e + 2 \, a b c f\right )} x^{2}\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c - {\left (2 \, c x^{2} + b\right )} \sqrt {b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) + {\left (b^{3} c - 4 \, a b c^{2}\right )} d - 2 \, {\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} e + {\left (a b^{3} - 4 \, a^{2} b c\right )} f}{2 \, {\left (a b^{4} c - 8 \, a^{2} b^{2} c^{2} + 16 \, a^{3} c^{3} + {\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{4} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2}\right )}}, -\frac {{\left (2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d - {\left (b^{3} c - 4 \, a b c^{2}\right )} e + {\left (b^{4} - 6 \, a b^{2} c + 8 \, a^{2} c^{2}\right )} f\right )} x^{2} - 2 \, {\left ({\left (2 \, c^{3} d - b c^{2} e + 2 \, a c^{2} f\right )} x^{4} + 2 \, a c^{2} d - a b c e + 2 \, a^{2} c f + {\left (2 \, b c^{2} d - b^{2} c e + 2 \, a b c f\right )} x^{2}\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {{\left (2 \, c x^{2} + b\right )} \sqrt {-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) + {\left (b^{3} c - 4 \, a b c^{2}\right )} d - 2 \, {\left (a b^{2} c - 4 \, a^{2} c^{2}\right )} e + {\left (a b^{3} - 4 \, a^{2} b c\right )} f}{2 \, {\left (a b^{4} c - 8 \, a^{2} b^{2} c^{2} + 16 \, a^{3} c^{3} + {\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{4} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.64, size = 140, normalized size = 1.14 \begin {gather*} -\frac {{\left (2 \, c d + 2 \, a f - b e\right )} \arctan \left (\frac {2 \, c x^{2} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (b^{2} - 4 \, a c\right )} \sqrt {-b^{2} + 4 \, a c}} - \frac {2 \, c^{2} d x^{2} + b^{2} f x^{2} - 2 \, a c f x^{2} - b c x^{2} e + b c d + a b f - 2 \, a c e}{2 \, {\left (c x^{4} + b x^{2} + a\right )} {\left (b^{2} c - 4 \, a c^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.38, size = 342, normalized size = 2.78 \begin {gather*} \frac {\frac {a\,b\,f-2\,a\,c\,e+b\,c\,d}{2\,c\,\left (4\,a\,c-b^2\right )}+\frac {x^2\,\left (f\,b^2-e\,b\,c+2\,d\,c^2-2\,a\,f\,c\right )}{2\,c\,\left (4\,a\,c-b^2\right )}}{c\,x^4+b\,x^2+a}+\frac {\mathrm {atan}\left (\frac {{\left (4\,a\,c-b^2\right )}^4\,\left (x^2\,\left (\frac {\left (2\,c^3\,d+2\,a\,c^2\,f-b\,c^2\,e\right )\,\left (2\,a\,f-b\,e+2\,c\,d\right )}{a\,{\left (4\,a\,c-b^2\right )}^{7/2}}+\frac {\left (2\,b^3\,c^2-8\,a\,b\,c^3\right )\,\left (b^3-4\,a\,b\,c\right )\,{\left (2\,a\,f-b\,e+2\,c\,d\right )}^2}{2\,a\,{\left (4\,a\,c-b^2\right )}^{13/2}}\right )-\frac {2\,c^2\,\left (b^3-4\,a\,b\,c\right )\,{\left (2\,a\,f-b\,e+2\,c\,d\right )}^2}{{\left (4\,a\,c-b^2\right )}^{11/2}}\right )}{8\,a^2\,c^2\,f^2-8\,a\,b\,c^2\,e\,f+16\,a\,c^3\,d\,f+2\,b^2\,c^2\,e^2-8\,b\,c^3\,d\,e+8\,c^4\,d^2}\right )\,\left (2\,a\,f-b\,e+2\,c\,d\right )}{{\left (4\,a\,c-b^2\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________